package com.ww.scm.valueObject.grid;

import org.apache.commons.lang.StringUtils;

import com.ww.scm.constants.Constants;

public class Cell {
	String pid;
	String value0;
	String value1;
	String value2;
	String colspan;
	String rowspan;
	
	public Cell() {

	}

	public Cell(String pid, String value0, String colspan) {
		this.pid = pid;
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY_HTML;
		}
		this.colspan = colspan;
	}

	public Cell(String pid, String value0, int colspan) {
		this.pid = pid;
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY_HTML;
		}
		this.colspan = String.valueOf(colspan);
	}
	public Cell(String pid, String value0, int colspan,String value1) {
		this.pid = pid;
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY_HTML;
		}
		this.colspan = String.valueOf(colspan);
		this.value1 = value1;
	}
	public Cell(String pid, String value0, int colspan,String value1,String value2) {
		this.pid = pid;
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY_HTML;
		}
		this.colspan = String.valueOf(colspan);
		this.value1 = value1;
		this.value2 = value2;
	}
	
	public Cell(String pid, String value0, String value1, int colspan) {
		this.pid = pid;
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY;
		}
		this.value1 = value1;
		this.colspan = String.valueOf(colspan);
	}

	public String getValue2() {
		return value2;
	}

	public void setValue2(String value2) {
		this.value2 = value2;
	}

	public String getColspan() {
		return colspan;
	}

	public void setColspan(String colspan) {
		this.colspan = colspan;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getValue0() {
		return value0;
	}

	public void setValue0(String value0) {
		this.value0 = value0;
		if (StringUtils.isBlank(this.value0)){
			this.value0 =Constants.EMPTY_HTML;
		}
	}

	public String getValue1() {
		return value1;
	}

	public void setValue1(String value1) {
		this.value1 = value1;
	}
	
	

	public String getRowspan() {
		return rowspan;
	}

	public void setRowspan(String rowspan) {
		this.rowspan = rowspan;
	}

	public String toString() {
		StringBuffer sb = new StringBuffer();

		sb.append("<");
		sb.append("pid");
		sb.append(">");

		sb.append(pid);

		sb.append("</");
		sb.append("pid");
		sb.append(">");

		sb.append("<");
		sb.append("value0");
		sb.append(">");

		sb.append(value0);

		sb.append("</");
		sb.append("value0");
		sb.append(">");

		sb.append("<");
		sb.append("value1");
		sb.append(">");

		sb.append(value1);

		sb.append("</");
		sb.append("value1");
		sb.append(">");

		return sb.toString();
	}
}
